home *** CD-ROM | disk | FTP | other *** search
- /*
- * Load selected 'dvi' files from an DOpus lister into ShowDVI. If
- * ShowDVI port is found, files are loaded directly, otherwise ShowDVI
- * is invoked first.
- *
- * V1.0 (12.7.96) by David Lübbren.
- *
- * Installation:
- * Create a file type DVI with the following:
- * Compare Name #?.dvi (or something more sophisticated)
- *
- * Add the following action:
- * DoubleClick Arexx DOpus5:ARexx/showdvi {Qp} {f}
- *
- */
-
- StackSize = 8192
- ShowDVIPort = 'showdvi'
-
- OPTIONS RESULTS
-
- PARSE ARG dopusport file .
- IF dopusport ~= "" THEN ADDRESS VALUE dopusport
- else do
- say "No DOpus running !"
- exit
- end
-
- file = STRIP(file, 'B', '"')
-
- IF ~SHOW('Ports', ShowDVIPort) THEN DO
- PRAGMA('Stack', StackSize)
- ADDRESS COMMAND
- 'run <nil: >nil: TeXMF:bin/pastex/ShowDVI' file
- 'WaitForPort' ShowDVIPort
- ADDRESS
- IF rc = 5 THEN DO
- dopus request '"Unable to load ''ShowDVI''" Cancel'
- EXIT 20
- END
- END
- ELSE DO
- ADDRESS VALUE ShowDVIPort
- loadnew file
- ADDRESS
- ADDRESS VALUE ShowDVIPort
- 'tofront'
- 'activate'
- ADDRESS
- END
-
- EXIT 0
-
-